
package com.scs.application.modules.settlement.mapper;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.scs.application.modules.settlement.entity.DeptOprtUse;
import com.scs.application.modules.settlement.request.DeptOprtUseQueryRequest;
import com.scs.application.modules.settlement.request.SumHighQueryRequest;
import com.scs.application.modules.settlement.request.SumHighQueryResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 病人消耗主单 mapper对象
 */
@Mapper
public interface DeptOprtUseMapper extends BaseMapper<DeptOprtUse> {

    IPage<DeptOprtUse> pageDeptOprtUse(IPage page, @Param("request") DeptOprtUseQueryRequest request);

    List<DeptOprtUse> listDeptOprtUse(@Param("request") DeptOprtUseQueryRequest request);

    // 高耗汇总查询
    IPage<DeptOprtUse> pageSumHigh(IPage page, @Param("request") SumHighQueryRequest request);

    /**
     * 通用分页查询
     * @param page
     * @return
     */
    IPage<SumHighQueryResult> pageSum(IPage<DeptOprtUse> page, @Param(Constants.WRAPPER) QueryWrapper<DeptOprtUse> queryWrapper);

    /**
     * 通用分页查询
     * @param page
     * @return
     */
    List<SumHighQueryResult> listSum(@Param(Constants.WRAPPER) QueryWrapper<DeptOprtUse> queryWrapper);



    /**
     * 通用分页查询
     * @param page
     * @return
     */
    IPage<SumHighQueryResult> pageSumByMatrName(IPage<DeptOprtUse> page, @Param(Constants.WRAPPER) QueryWrapper<DeptOprtUse> queryWrapper);
    /**
     * 通用分页查询
     * @param page
     * @return
     */
    List<SumHighQueryResult> listSumByMatrName(@Param(Constants.WRAPPER) QueryWrapper<DeptOprtUse> queryWrapper);

}
